var o=["o_province","o_city","o_county"];//三个select的name
var opt1 = ["省份","地级市","县级市"];//初始值
function _init_area2(){  //初始化函数
    for(i=0;i<o.length-1;i++){
        document.getElementById(o[i]).onchange=new Function("change2("+(i+1)+")");
    }
    change2(0);
}

function change2(v){
    var str="0";
    for(i=0;i<v;i++){
        str+=("_"+(document.getElementById(o[i]).selectedIndex-1));
    };
    var ss=document.getElementById(o[v]);
    with(ss){
        length = 0;
        options[0]=new Option(opt1[v],opt1[v]);
        if(v && document.getElementById(o[v-1]).selectedIndex>0 || !v){
            if(dsy.Exists(str)){
                ar = dsy.Items[str];
                for(i=0;i<ar.length;i++){
                    options[length]=new Option(ar[i],ar[i]);
                }//end for
                if(v){ options[0].selected = true; }
            }
        }//end if v
        if(++v<o.length){change2(v);}
    }//End with
}
